package com.mall.user.domain.model;

public record AreaId1(Long id) {
    public AreaId1 {
        //一级地区编号最小值为0
        if (id < 0) {
            throw new IllegalArgumentException("一级地区编号最小值为1");
        }
    }

    public static AreaId1 of(Long id) {
        return new AreaId1(id);
    }
}
